package com.ar4j.bench.common.service;

import java.util.List;

import com.ar4j.bench.common.domain.IItem;

/**
 * The API for all item service implementations, defines the minimum set of operations required to run the benchmark tests.
 */
public interface IItemService {

  /**
   * Add an item to the backing store
   */
  Long addItem(IItem item);
  
  /**
   * Retrieve an item from the backing store
   */
  IItem findById(Long id);
  
  /**
   * Retrieve a list of item with the given product ID
   */
  List<IItem> findByProductId(Long productId);
  
  /**
   * Update an item in the backing store
   */
  void updateItem(IItem item);
  
  /**
   * Remove an item from the backing store
   */
  void removeById(Long id);
  
}
